//
//  SectionHeadView.m
//  EPTool
//
//  Created by guoshiqing on 2018/5/18.
//  Copyright © 2018年 云数动能科技. All rights reserved.
//

#import "SectionHeadView.h"
#import "Macro.h"

@implementation SectionHeadView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/


- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self addSubviews];
    }
    return self;
}


- (void)addSubviews
{
    [self addSubview:self.lblTitle];
    [self addSubview:self.lblSubTitle];
}

- (UILabel *)lblTitle
{
    if (!_lblTitle) {
        _lblTitle = [[UILabel alloc] initWithFrame:CGRectMake(Cell_X, 5.0f, UI_SCREEN_WIDTH/2 - Cell_X, self.frame.size.height)];
        _lblTitle.textColor = [EPColor epColor_descMessageGray];
        _lblTitle.font = SystemFont(14.0f);
    }
    return _lblTitle;
}

- (UILabel *)lblSubTitle
{
    if (!_lblSubTitle) {
        _lblSubTitle = [[UILabel alloc] initWithFrame:CGRectMake(UI_SCREEN_WIDTH/2, 5.0f, UI_SCREEN_WIDTH/2 - Cell_X, self.frame.size.height)];
        _lblSubTitle.textColor = [EPColor epColor_descMessageGray];
        _lblSubTitle.font = SystemFont(14.0f);
        _lblSubTitle.textAlignment = NSTextAlignmentRight;
    }
    return _lblSubTitle;
}

@end
